<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>StoreStaff::StaffSalary</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>
    <div class="banner">
        
        <h1>
            <span class="type">Module</span>
            StoreStaff::StaffSalary
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/app/models/store_staff/staff_salary_rb.html">app/models/store_staff/staff_salary.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-actual_amount">actual_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-actual_payment">actual_payment</a>,
              </li>
            
              
              <li>
                <a href="#method-i-attendence_amount">attendence_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-attendence_off_hours">attendence_off_hours</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>C</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-canfei">canfei</a>,
              </li>
            
              
              <li>
                <a href="#method-i-checked_salary">checked_salary</a>,
              </li>
            
              
              <li>
                <a href="#method-i-commission_amount">commission_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-current_salary_month">current_salary_month</a>,
              </li>
            
              
              <li>
                <a href="#method-i-cutfee_amount">cutfee_amount</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>D</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-debit_total">debit_total</a>,
              </li>
            
              
              <li>
                <a href="#method-i-discipline_amount">discipline_amount</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>G</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-gangwei">gangwei</a>,
              </li>
            
              
              <li>
                <a href="#method-i-gaowen">gaowen</a>,
              </li>
            
              
              <li>
                <a href="#method-i-gongjijin">gongjijin</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>H</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-has_salary-3F">has_salary?</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>I</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-c-included">included</a>,
              </li>
            
              
              <li>
                <a href="#method-i-initialize_salary">initialize_salary</a>,
              </li>
            
              
              <li>
                <a href="#method-i-insurance">insurance</a>,
              </li>
            
              
              <li>
                <a href="#method-i-insurance_amount">insurance_amount</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>J</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-jiaotong">jiaotong</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>L</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-laobao">laobao</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>O</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-other_subsidy">other_subsidy</a>,
              </li>
            
              
              <li>
                <a href="#method-i-overtime_amount">overtime_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-overtime_hours">overtime_hours</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-reset_salary">reset_salary</a>,
              </li>
            
              
              <li>
                <a href="#method-i-review_salary">review_salary</a>,
              </li>
            
              
              <li>
                <a href="#method-i-reward_amount">reward_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-reward_total">reward_total</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>S</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-salary">salary</a>,
              </li>
            
              
              <li>
                <a href="#method-i-salary_id">salary_id</a>,
              </li>
            
              
              <li>
                <a href="#method-i-salary_status">salary_status</a>,
              </li>
            
              
              <li>
                <a href="#method-i-shiye">shiye</a>,
              </li>
            
              
              <li>
                <a href="#method-i-should_cutfee">should_cutfee</a>,
              </li>
            
              
              <li>
                <a href="#method-i-should_pay_amount">should_pay_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-subsidy">subsidy</a>,
              </li>
            
              
              <li>
                <a href="#method-i-subsidy_amount">subsidy_amount</a>,
              </li>
            
              
              <li>
                <a href="#method-i-subsidy_by">subsidy_by</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>U</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-unchecked_salary">unchecked_salary</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>Y</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-yanglao">yanglao</a>,
              </li>
            
              
              <li>
                <a href="#method-i-yiliao">yiliao</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>Z</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="#method-i-zhusu">zhusu</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">DEFAULT_SALARY_MONTH</td>
            <td>=</td>
            <td class="attr-value">Time.now.last_month</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
      </table>
    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-included">
            
              <b>included</b>(base)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-c-included" name="method-c-included" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-c-included_source')" id="l_method-c-included_source">show</a>
                
              </p>
              <div id="method-c-included_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 5</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-actual_amount">
            
              <b>actual_amount</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-actual_amount" name="method-i-actual_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-actual_amount_source')" id="l_method-i-actual_amount_source">show</a>
                
              </p>
              <div id="method-i-actual_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 97</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">actual_amount</span>
  <span class="ruby-identifier">actual_payment</span>.<span class="ruby-identifier">round</span>(<span class="ruby-number">2</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-actual_payment">
            
              <b>actual_payment</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-actual_payment" name="method-i-actual_payment" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-actual_payment_source')" id="l_method-i-actual_payment_source">show</a>
                
              </p>
              <div id="method-i-actual_payment_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 58</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">actual_payment</span>
  <span class="ruby-identifier">should_pay_amount</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">cutfee_amount</span>.<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-attendence_amount">
            
              <b>attendence_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-attendence_amount" name="method-i-attendence_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-attendence_amount_source')" id="l_method-i-attendence_amount_source">show</a>
                
              </p>
              <div id="method-i-attendence_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 14</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">attendence_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">attendences</span>.<span class="ruby-identifier">by_month</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">without_off</span>.<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:amount</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-attendence_off_hours">
            
              <b>attendence_off_hours</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-attendence_off_hours" name="method-i-attendence_off_hours" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-attendence_off_hours_source')" id="l_method-i-attendence_off_hours_source">show</a>
                
              </p>
              <div id="method-i-attendence_off_hours_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 34</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">attendence_off_hours</span>
  <span class="ruby-identifier">attendences</span>.<span class="ruby-identifier">attendence_off</span>.<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:hour</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-canfei">
            
              <b>canfei</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-canfei" name="method-i-canfei" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>餐补</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-canfei_source')" id="l_method-i-canfei_source">show</a>
                
              </p>
              <div id="method-i-canfei_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 162</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">canfei</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;canfei&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-checked_salary">
            
              <b>checked_salary</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-checked_salary" name="method-i-checked_salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-checked_salary_source')" id="l_method-i-checked_salary_source">show</a>
                
              </p>
              <div id="method-i-checked_salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 74</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">checked_salary</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">salaries</span>.<span class="ruby-identifier">checked</span>.<span class="ruby-identifier">last_month_salary</span>.<span class="ruby-identifier">last</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-commission_amount">
            
              <b>commission_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-commission_amount" name="method-i-commission_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-commission_amount_source')" id="l_method-i-commission_amount_source">show</a>
                
              </p>
              <div id="method-i-commission_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 54</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">commission_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">commission</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">store</span>.<span class="ruby-identifier">orders</span>.<span class="ruby-identifier">amount_by_month</span>(<span class="ruby-identifier">month</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-current_salary_month">
            
              <b>current_salary_month</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-current_salary_month" name="method-i-current_salary_month" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-current_salary_month_source')" id="l_method-i-current_salary_month_source">show</a>
                
              </p>
              <div id="method-i-current_salary_month_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 10</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">current_salary_month</span>
  <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">last_month</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y-%m&quot;</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-cutfee_amount">
            
              <b>cutfee_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-cutfee_amount" name="method-i-cutfee_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-cutfee_amount_source')" id="l_method-i-cutfee_amount_source">show</a>
                
              </p>
              <div id="method-i-cutfee_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 46</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">cutfee_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">insurance_amount</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">should_cutfee</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-debit_total">
            
              <b>debit_total</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-debit_total" name="method-i-debit_total" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-debit_total_source')" id="l_method-i-debit_total_source">show</a>
                
              </p>
              <div id="method-i-debit_total_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 89</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">debit_total</span>
  <span class="ruby-identifier">should_cutfee</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-discipline_amount">
            
              <b>discipline_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-discipline_amount" name="method-i-discipline_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-discipline_amount_source')" id="l_method-i-discipline_amount_source">show</a>
                
              </p>
              <div id="method-i-discipline_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 22</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">discipline_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">disciplines</span>.<span class="ruby-identifier">by_month</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:amount</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-gangwei">
            
              <b>gangwei</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-gangwei" name="method-i-gangwei" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>岗位</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-gangwei_source')" id="l_method-i-gangwei_source">show</a>
                
              </p>
              <div id="method-i-gangwei_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 152</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gangwei</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;gangwei&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-gaowen">
            
              <b>gaowen</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-gaowen" name="method-i-gaowen" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>高温</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-gaowen_source')" id="l_method-i-gaowen_source">show</a>
                
              </p>
              <div id="method-i-gaowen_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 177</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gaowen</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;gaowen&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-gongjijin">
            
              <b>gongjijin</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-gongjijin" name="method-i-gongjijin" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-gongjijin_source')" id="l_method-i-gongjijin_source">show</a>
                
              </p>
              <div id="method-i-gongjijin_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 205</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">gongjijin</span>
  <span class="ruby-identifier">insurance</span>[<span class="ruby-string">&#39;gongjijin&#39;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-has_salary-3F">
            
              <b>has_salary?</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-has_salary-3F" name="method-i-has_salary-3F" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-has_salary-3F_source')" id="l_method-i-has_salary-3F_source">show</a>
                
              </p>
              <div id="method-i-has_salary-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 62</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">has_salary?</span>
  <span class="ruby-identifier">salary</span>.<span class="ruby-identifier">present?</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-initialize_salary">
            
              <b>initialize_salary</b>(created_month = nil, basic = nil)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-initialize_salary" name="method-i-initialize_salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-initialize_salary_source')" id="l_method-i-initialize_salary_source">show</a>
                
              </p>
              <div id="method-i-initialize_salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 109</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize_salary</span>(<span class="ruby-identifier">created_month</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">basic</span> = <span class="ruby-keyword">nil</span>)
  <span class="ruby-ivar">@salary</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">salaries</span>.<span class="ruby-identifier">create!</span>(
    <span class="ruby-identifier">store_id</span><span class="ruby-operator">:</span> <span class="ruby-identifier">store_id</span>,
    <span class="ruby-identifier">basic</span><span class="ruby-operator">:</span> <span class="ruby-identifier">basic</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">basic_salary</span>,
    <span class="ruby-identifier">subsidy</span><span class="ruby-operator">:</span> {
      <span class="ruby-identifier">gangwei</span><span class="ruby-operator">:</span> <span class="ruby-identifier">gangwei</span>,
      <span class="ruby-identifier">canfei</span><span class="ruby-operator">:</span> <span class="ruby-identifier">canfei</span>,
      <span class="ruby-identifier">zhusu</span><span class="ruby-operator">:</span> <span class="ruby-identifier">zhusu</span>,
      <span class="ruby-identifier">laobao</span><span class="ruby-operator">:</span> <span class="ruby-identifier">laobao</span>,
      <span class="ruby-identifier">jiaotong</span><span class="ruby-operator">:</span> <span class="ruby-identifier">jiaotong</span>,
      <span class="ruby-identifier">gaowen</span><span class="ruby-operator">:</span> <span class="ruby-identifier">gaowen</span>,
      <span class="ruby-identifier">other</span><span class="ruby-operator">:</span> <span class="ruby-identifier">other_subsidy</span>
    },
    <span class="ruby-identifier">subsidy_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">subsidy_amount</span>,
    <span class="ruby-identifier">insurance</span><span class="ruby-operator">:</span> {
      <span class="ruby-identifier">yiliao</span><span class="ruby-operator">:</span> <span class="ruby-identifier">yiliao</span>,
      <span class="ruby-identifier">yanglao</span><span class="ruby-operator">:</span> <span class="ruby-identifier">yanglao</span>,
      <span class="ruby-identifier">shiye</span><span class="ruby-operator">:</span> <span class="ruby-identifier">shiye</span>,
      <span class="ruby-identifier">gongjijin</span><span class="ruby-operator">:</span> <span class="ruby-identifier">gongjijin</span>
    },
    <span class="ruby-identifier">insurance_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">insurance_amount</span>,
    <span class="ruby-identifier">commission</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commission</span>,
    <span class="ruby-identifier">commission_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">commission_amount</span>,
    <span class="ruby-identifier">created_month</span><span class="ruby-operator">:</span> <span class="ruby-identifier">created_month</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">last_month</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y%m&quot;</span>),
    <span class="ruby-identifier">attendence_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">attendence_amount</span>,
    <span class="ruby-identifier">discipline_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">discipline_amount</span>,
    <span class="ruby-identifier">reward_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">reward_amount</span>,
    <span class="ruby-identifier">overtime_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">overtime_amount</span>,
    <span class="ruby-identifier">debit_total</span><span class="ruby-operator">:</span> <span class="ruby-identifier">debit_total</span>,
    <span class="ruby-identifier">reward_total</span><span class="ruby-operator">:</span> <span class="ruby-identifier">reward_total</span>,
    <span class="ruby-identifier">actual_amount</span><span class="ruby-operator">:</span> <span class="ruby-identifier">actual_amount</span>
  )
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-insurance">
            
              <b>insurance</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-insurance" name="method-i-insurance" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-insurance_source')" id="l_method-i-insurance_source">show</a>
                
              </p>
              <div id="method-i-insurance_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 189</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">insurance</span>
  <span class="ruby-identifier">read_attribute</span>(<span class="ruby-value">:insurance</span>) <span class="ruby-operator">||</span> {}
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-insurance_amount">
            
              <b>insurance_amount</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-insurance_amount" name="method-i-insurance_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-insurance_amount_source')" id="l_method-i-insurance_amount_source">show</a>
                
              </p>
              <div id="method-i-insurance_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 209</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">insurance_amount</span>
  (<span class="ruby-identifier">yiliao</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">yanglao</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">shiye</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">gongjijin</span>).<span class="ruby-identifier">round</span>(<span class="ruby-number">2</span>) <span class="ruby-operator">||</span>  <span class="ruby-number">0.0</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-jiaotong">
            
              <b>jiaotong</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-jiaotong" name="method-i-jiaotong" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>交通</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-jiaotong_source')" id="l_method-i-jiaotong_source">show</a>
                
              </p>
              <div id="method-i-jiaotong_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 172</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">jiaotong</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;jiaotong&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-laobao">
            
              <b>laobao</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-laobao" name="method-i-laobao" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>劳保</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-laobao_source')" id="l_method-i-laobao_source">show</a>
                
              </p>
              <div id="method-i-laobao_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 167</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">laobao</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;laobao&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-other_subsidy">
            
              <b>other_subsidy</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-other_subsidy" name="method-i-other_subsidy" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-other_subsidy_source')" id="l_method-i-other_subsidy_source">show</a>
                
              </p>
              <div id="method-i-other_subsidy_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 181</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">other_subsidy</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;other&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-overtime_amount">
            
              <b>overtime_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-overtime_amount" name="method-i-overtime_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-overtime_amount_source')" id="l_method-i-overtime_amount_source">show</a>
                
              </p>
              <div id="method-i-overtime_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 30</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">overtime_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">overtimes</span>.<span class="ruby-identifier">overtime_amount</span>.<span class="ruby-identifier">by_month</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:amount</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-overtime_hours">
            
              <b>overtime_hours</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-overtime_hours" name="method-i-overtime_hours" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-overtime_hours_source')" id="l_method-i-overtime_hours_source">show</a>
                
              </p>
              <div id="method-i-overtime_hours_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">overtime_hours</span>
  <span class="ruby-identifier">overtimes</span>.<span class="ruby-identifier">overtime_hours</span>.<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:hour</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-reset_salary">
            
              <b>reset_salary</b>(new_salary)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-reset_salary" name="method-i-reset_salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-reset_salary_source')" id="l_method-i-reset_salary_source">show</a>
                
              </p>
              <div id="method-i-reset_salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 38</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reset_salary</span>(<span class="ruby-identifier">new_salary</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">update!</span>(<span class="ruby-identifier">basic_salary</span><span class="ruby-operator">:</span> <span class="ruby-identifier">new_salary</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-review_salary">
            
              <b>review_salary</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-review_salary" name="method-i-review_salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-review_salary_source')" id="l_method-i-review_salary_source">show</a>
                
              </p>
              <div id="method-i-review_salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 78</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">review_salary</span>
  <span class="ruby-ivar">@salary</span> = <span class="ruby-identifier">salary</span>
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@salary</span>.<span class="ruby-identifier">present?</span>
    <span class="ruby-keyword">return</span> <span class="ruby-ivar">@salary</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@salary</span>.<span class="ruby-identifier">salary_status</span>.<span class="ruby-identifier">present?</span>
    <span class="ruby-keyword">self</span>.<span class="ruby-identifier">reset_salary</span>(<span class="ruby-ivar">@salary</span>.<span class="ruby-identifier">basic</span>) <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">basic_salary</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@salary</span>.<span class="ruby-identifier">basic</span>
    <span class="ruby-keyword">return</span> <span class="ruby-ivar">@salary</span> = <span class="ruby-keyword">self</span> <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@salary</span>.<span class="ruby-identifier">salary_status</span>.<span class="ruby-identifier">present?</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">initialize_salary</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-reward_amount">
            
              <b>reward_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-reward_amount" name="method-i-reward_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-reward_amount_source')" id="l_method-i-reward_amount_source">show</a>
                
              </p>
              <div id="method-i-reward_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 18</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reward_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">rewards</span>.<span class="ruby-identifier">by_month</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">sum</span>(<span class="ruby-operator">&amp;</span><span class="ruby-value">:amount</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-reward_total">
            
              <b>reward_total</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-reward_total" name="method-i-reward_total" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-reward_total_source')" id="l_method-i-reward_total_source">show</a>
                
              </p>
              <div id="method-i-reward_total_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 93</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">reward_total</span>
  <span class="ruby-identifier">reward_amount</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">overtime_amount</span>.<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-salary">
            
              <b>salary</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-salary" name="method-i-salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-salary_source')" id="l_method-i-salary_source">show</a>
                
              </p>
              <div id="method-i-salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 66</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">salary</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">salaries</span>.<span class="ruby-identifier">last_month_salary</span>.<span class="ruby-identifier">last</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-salary_id">
            
              <b>salary_id</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-salary_id" name="method-i-salary_id" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-salary_id_source')" id="l_method-i-salary_id_source">show</a>
                
              </p>
              <div id="method-i-salary_id_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 105</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">salary_id</span>
  <span class="ruby-identifier">salary</span>.<span class="ruby-identifier">id</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-salary_status">
            
              <b>salary_status</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-salary_status" name="method-i-salary_status" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-salary_status_source')" id="l_method-i-salary_status_source">show</a>
                
              </p>
              <div id="method-i-salary_status_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 101</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">salary_status</span>
  <span class="ruby-identifier">salary</span>.<span class="ruby-identifier">status</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-shiye">
            
              <b>shiye</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-shiye" name="method-i-shiye" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-shiye_source')" id="l_method-i-shiye_source">show</a>
                
              </p>
              <div id="method-i-shiye_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 201</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">shiye</span>
  <span class="ruby-identifier">insurance</span>[<span class="ruby-string">&quot;shiye&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-should_cutfee">
            
              <b>should_cutfee</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-should_cutfee" name="method-i-should_cutfee" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-should_cutfee_source')" id="l_method-i-should_cutfee_source">show</a>
                
              </p>
              <div id="method-i-should_cutfee_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 50</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">should_cutfee</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">discipline_amount</span>(<span class="ruby-identifier">month</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">attendence_amount</span>(<span class="ruby-identifier">month</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-should_pay_amount">
            
              <b>should_pay_amount</b>(month = DEFAULT_SALARY_MONTH)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-should_pay_amount" name="method-i-should_pay_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-should_pay_amount_source')" id="l_method-i-should_pay_amount_source">show</a>
                
              </p>
              <div id="method-i-should_pay_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 42</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">should_pay_amount</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">DEFAULT_SALARY_MONTH</span>)
  <span class="ruby-identifier">basic_salary</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">subsidy_amount</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">reward_amount</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">overtime_amount</span>(<span class="ruby-identifier">month</span>).<span class="ruby-identifier">to_f</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">commission_amount</span>.<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-subsidy">
            
              <b>subsidy</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-subsidy" name="method-i-subsidy" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-subsidy_source')" id="l_method-i-subsidy_source">show</a>
                
              </p>
              <div id="method-i-subsidy_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 143</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">subsidy</span>
  <span class="ruby-identifier">read_attribute</span>(<span class="ruby-value">:subsidy</span>) <span class="ruby-operator">||</span> {}
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-subsidy_amount">
            
              <b>subsidy_amount</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-subsidy_amount" name="method-i-subsidy_amount" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-subsidy_amount_source')" id="l_method-i-subsidy_amount_source">show</a>
                
              </p>
              <div id="method-i-subsidy_amount_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 185</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">subsidy_amount</span>
  (<span class="ruby-identifier">gangwei</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">zhusu</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">canfei</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">laobao</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">jiaotong</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">gaowen</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other_subsidy</span>).<span class="ruby-identifier">round</span>(<span class="ruby-number">2</span>) <span class="ruby-operator">||</span> <span class="ruby-number">0.0</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-subsidy_by">
            
              <b>subsidy_by</b>(name)
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-subsidy_by" name="method-i-subsidy_by" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-subsidy_by_source')" id="l_method-i-subsidy_by_source">show</a>
                
              </p>
              <div id="method-i-subsidy_by_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 147</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">subsidy_by</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-identifier">name</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-unchecked_salary">
            
              <b>unchecked_salary</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-unchecked_salary" name="method-i-unchecked_salary" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-unchecked_salary_source')" id="l_method-i-unchecked_salary_source">show</a>
                
              </p>
              <div id="method-i-unchecked_salary_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 70</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">unchecked_salary</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">salaries</span>.<span class="ruby-identifier">uncheck</span>.<span class="ruby-identifier">last_month_salary</span>.<span class="ruby-identifier">last</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-yanglao">
            
              <b>yanglao</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-yanglao" name="method-i-yanglao" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-yanglao_source')" id="l_method-i-yanglao_source">show</a>
                
              </p>
              <div id="method-i-yanglao_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 197</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">yanglao</span>
  <span class="ruby-identifier">insurance</span>[<span class="ruby-string">&quot;yanglao&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-yiliao">
            
              <b>yiliao</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-yiliao" name="method-i-yiliao" class="permalink">Link</a>
          </div>

          
            <div class="description">
              
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-yiliao_source')" id="l_method-i-yiliao_source">show</a>
                
              </p>
              <div id="method-i-yiliao_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 193</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">yiliao</span>
  <span class="ruby-identifier">insurance</span>[<span class="ruby-string">&quot;yiliao&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-zhusu">
            
              <b>zhusu</b>()
            
            <a href="../../classes/StoreStaff/StaffSalary.html#method-i-zhusu" name="method-i-zhusu" class="permalink">Link</a>
          </div>

          
            <div class="description">
              <p>住宿</p>
            </div>
          

          

          

          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source:
                <a href="javascript:toggleSource('method-i-zhusu_source')" id="l_method-i-zhusu_source">show</a>
                
              </p>
              <div id="method-i-zhusu_source" class="dyn-source">
                <pre><span class="ruby-comment"># File app/models/store_staff/staff_salary.rb, line 157</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">zhusu</span>
  <span class="ruby-identifier">subsidy</span>[<span class="ruby-string">&quot;zhusu&quot;</span>].<span class="ruby-identifier">to_f</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>
